package cn.net.wangyixinwen.api;

import java.util.List;
import java.util.Map;

import cn.net.wangyixinwen.bean.NewsBean;
import cn.net.wangyixinwen.bean.OrderBean;
import cn.net.wangyixinwen.bean.TypeNewsBean;
import cn.net.wangyixinwen.bean.VideoBean;
import io.reactivex.rxjava3.core.Observable;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.Query;
import retrofit2.http.Url;

/**
 * 接口
 */
public interface ApiService {

    @GET("nc/article/headline/T1348647853363/0-40.html")
    Observable<Map<String, List<NewsBean>>> getHome();

    @GET
    Observable<Map<String, List<NewsBean>>> getJX(@Url String path);

    @Headers(value = "User-Agent: Apifox/1.0.0 (https://www.apifox.cn)")
    @GET
    Observable<Map<String, List<NewsBean>>> getTypeList(@Url String path);

    @Headers(value = "User-Agent: Apifox/1.0.0 (https://www.apifox.cn)")
    @GET
    Observable<TypeNewsBean> getTypeList1(@Url String path);


    @GET
    Observable<Map<String, List<VideoBean>>> getVideo(@Url String path);

    @GET("mobile/discovery/v2/categories")
    Observable<OrderBean> getCategories(
            @Query("channel") String channel,
            @Query("code") String code,
            @Query("device") String device,
            @Query("picVersion") int picVersion,
            @Query("scale") int scale,
            @Query("version") String version
    );
}
